feat(display): show weather values as whole numbers (round_values setting)#475
Open
feat(display): show weather values as whole numbers (round_values setting)#475
Conversation
Adds a boolean AppSettings.round_values (default False) that strips decimals from all displayed weather values when enabled. Wires through current conditions, forecast, and taskbar icon text. Adds a checkbox in the Settings dialog Display section. Fixes a test assertion using 0.15 (FP banker's rounding) in favour of 0.17. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
round_values: bool = FalsetoAppSettings(was already partially in-flight in config.py)precision=0when enabledtests/test_round_values_setting.pywith 25 tests covering AppSettings, unit formatters, current conditions builder, forecast builder, seasonal metrics, and TaskbarIconUpdater0.15rounding to0.2at precision=1, which fails due to Python binary float representation; changed input to0.17Files changed
models/config.pyround_valuesfield + serialisationui/dialogs/settings_dialog.pydisplay/presentation/current_conditions.pyround_valuesdisplay/presentation/forecast.pydisplay/presentation/formatters.pyget_temperature_precisionhelper used by display pathtaskbar_icon_updater.pyround_valuesparam, precision applied per metricapp.pyround_valuesfrom settings toTaskbarIconUpdatertests/test_round_values_setting.pyTest plan
pytest tests/test_round_values_setting.py→ 25 passed, 0 failed🤖 Generated with Claude Code